<template>
	<view class="right-fix-main-box">
			<image @click="gotoWxPlatform" mode="widthFix" class="imgs" src="https://web.78keji.cn/images/hht/down.png"></image>
		
		 <image @click="telHandler" mode="widthFix" class="img" src="https://web.78keji.cn/images/hht/kefu.png"></image>


	</view>
	<agreement v-if="isShowAgreement" :rootImagePath="rootImagePath" :agreementType="agreementType"
		@ok="agreementOkHandler"></agreement>
</template>

<script setup>
	import {
		ref
	} from "vue";

	const props = defineProps(['rootImagePath'])
	const isShowAgreement = ref(false)
	const agreementType = ref(1) // 1-订购须知,2-隐私政策

	const showAgreementHandler = (value) => {
		isShowAgreement.value = true;
		agreementType.value = value;
	}

	
	const gotoUrl = (url) => {
			window.location.href = url
		}

	const agreementOkHandler = () => {
		isShowAgreement.value = false;
	}

	const gotoWxPlatform = () => {
		console.log('gotoWxPlatform')
		window.location.href ='https://sj.qq.com/appdetail/com.booyue.babylisten?&from_wxz=1'
	}
	const telHandler = () => {
		uni.makePhoneCall({
			phoneNumber: '4008825010'
		})
	}
</script>

<style lang="scss">
	.right-fix-main-box {
		position: fixed;
		right: 0;
		top: 450rpx;
		

		.img {
			width: 100rpx;
			height: auto;
			display: block;
			margin-bottom: 20rpx;
		}
	}
	.imgs{
		position: fixed;
		top: 320rpx;
	width: 100rpx;
	right: 0;

}
</style>